package com.example.administrator.android2019.ch2Activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.administrator.android2019.R;

public class activity_all2Activity extends AppCompatActivity {

     private Button btn1,btn2,btn3,btn4,btn5;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_all2);
        init();
        View.OnClickListener click=new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                switch (v.getId()){
                    case R.id.btn1:
                        Intent intent1=new Intent(activity_all2Activity.this,RegisterActivity.class);
                        startActivity(intent1);
                        break;
                    case R.id.btn2:
                        Intent intent2=new Intent(activity_all2Activity.this,GoddnessActivity.class);
                        startActivity(intent2);
                        break;
                    case R.id.btn3:
                        Intent intent3=new Intent(activity_all2Activity.this,weightActivity.class);
                        startActivity(intent3);
                        break;
                    case R.id.btn4:
                        Intent intent4=new Intent(activity_all2Activity.this,ComputerActivity.class);
                        startActivity(intent4);
                        break;
                    case 5:
                        Intent intent5=new Intent(activity_all2Activity.this,MarketActivity.class);
                        startActivity(intent5);
                        break;
                }
            }
        };
        btn1.setOnClickListener(click);
        btn2.setOnClickListener(click);
        btn3.setOnClickListener(click);
        btn4.setOnClickListener(click);
        btn5.setOnClickListener(click);

    }
    public void init(){
        btn1=findViewById(R.id.btn1);
        btn2=findViewById(R.id.btn2);
        btn3=findViewById(R.id.btn3);
        btn4=findViewById(R.id.btn4);
        btn5=findViewById(R.id.btn5);

    }
}
